Add TransferFields SkipFieldsNotMatchingType guidance - #133
Merged
Jesper Schulz-Wedde (JesperSchulz) merged 4 commits intoAug 24, 2026
Conversation
Contributor
Author
|
@microsoft-github-policy-service agree |
Jesper Schulz-Wedde (JesperSchulz)
left a comment
Contributor
There was a problem hiding this comment.
Two correctness gaps and one sample clarification.
Contributor
Author
|
Jesper Schulz-Wedde (@JesperSchulz) all three points addressed in the latest commits, ready for another look whenever you have time. |
Aligns the article with the repo convention used by the sibling data-modeling files: the .good.al reference belongs under Best Practice and the .bad.al reference under Anti Pattern. Previously both pointers sat under Anti Pattern, leaving the good-sample reference orphaned in the wrong section. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3c998c71-f30b-40f3-b714-87fafed505d8
Jesper Schulz-Wedde (JesperSchulz)
approved these changes
Aug 24, 2026
Jesper Schulz-Wedde (JesperSchulz)
merged commit Aug 24, 2026
9fab601
into
microsoft:main
6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
One knowledge rule: don't use
TransferFields(..., SkipFieldsNotMatchingType: true)as a blanket way to keep two evolving tables transferring without
errors, when the destination actually depends on every source field
being copied.
Why this belongs in BCQuality
TransferFieldsonly errors on a type mismatch when both tables arein the same extension - cross-extension mismatches are already
skipped by default, flag or not. That distinction isn't obvious from
the method signature, and it's exactly the kind of thing where an AI
(or a dev in a hurry) reaches for
SkipFieldsNotMatchingType = trueto make a compile/runtime error go away without noticing a field
silently stopped being copied.
Files
community/knowledge/data-modeling/transferfields-skip-type-mismatch-can-drop-data.md.good.al- explicit field-by-field mapping withEvaluatefor thetype conversion, so a bad value fails loudly instead of vanishing
.bad.al- two tables in the same app,TransferFields(Source, true, true),Referencesilently dropped because it'sCode[20]on one side andIntegeron the otherVerified against
independently against community testing before writing the rule
One concern, one file, community layer.